#ifndef TIMEMGR_H
#define TIMEMGR_H


#include <ctime> //C-style 日期时间库  stl库
#include <sys/time.h>  //gettimeofday

#include <iostream>


class TimeMgr
{
public:
    TimeMgr()
        : m_microSecondsSinceEpoch(0)
    {}

    explicit TimeMgr(int64_t microSecondsSinceEpochArg)
        : m_microSecondsSinceEpoch(microSecondsSinceEpochArg)
    {}

    std::string toString() const;


    static int64_t now();

    static const int kMicroSecondsPerSecond = 1000 * 1000;

private:
    int64_t m_microSecondsSinceEpoch;
};

#endif // TIMEMGR_H
